package method;

/**
 * @Author quan
 * @Description TODO
 * @Date 2023/1/14 17:07
 */
public class For_method {
    public static void main(String[] args) {
        int out = add(1,1);
        int result = factor(5);
        System.out.println(out);
        System.out.println(result);
    }

    public static int add(int x, int y) {
        return x+y;
    }
    public static int factor(int num) {
        int res = 1;
        for (int i = 1; i <= num; i++) {
            res*=i;
        }
        return res;
    }
}
